package Excercise;

public class Ex01_Q35 {

	
	public static void main(String[] args) {
		int money = 100000;
		int pay = 10;
		int jandon = money-pay;
		
		int won50000 = 0,won10000=0,won5000=0,won1000 = 0,won500=0,won100=0,won50=0,won10=0;
		System.out.println("계산할 금액 : " + pay);
		System.out.println("지급액 : " + money);
		System.out.println("잔돈 : " + jandon);
		//56790
		
	
		
	    
		//반복문, 배열을 이용한 판돈 처리
		int[] charges = {0,0,0,0,0,0,0,0,0};
		int[] moneys = {0,50000,10000,5000,1000,500,100,50,10};
	    
		for(int i = 1; i<=8; ++i){
			charges[i] = jandon / moneys[i];
			jandon = jandon % moneys[i];
			System.out.println(moneys[i] + "/" + charges[i]);
	}	
	}

}
